/**
 * Generate time : 2011-06-07 18:22:14
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.cm.domain;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCMStockPlan
 * 
 */
public class ZMCMStockPlan extends DaoEPBase {

	private String fdKeyId = " "; /* 主键 */
	private String fdYear = " "; /* 年份 */
	private String fdMonth = " "; /* 月份 */
	private String fdChief = " "; /* 单位主管 */
	private String fdPlanStatus = " "; /* 计划状态 */
	private Double fdPlanSum = new Double(0); /* 计划总价 */
	private Long fdMaterialNum = new Long(0); /* 物资种类 */
	private String fdAuditor = " "; /* 审核人 */
	private String fdEditor = " "; /* 编制人 */
	private String fdEditInstruction = " "; /* 编制说明 */
	private String fdEditDate = " "; /* 编制日期 */
	private String fdRemark = " "; /* 备注 */
	private Long fdStatus = new Long(0); /* 问题状态 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("主键");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdYear");
		eiColumn.setFieldLength(4);
		eiColumn.setDescName("年份");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMonth");
		eiColumn.setFieldLength(2);
		eiColumn.setDescName("月份");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdChief");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("单位主管");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPlanStatus");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("计划状态");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPlanSum");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("计划总价");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMaterialNum");
		eiColumn.setType("N");
		eiColumn.setScaleLength(0);
		eiColumn.setFieldLength(38);
		eiColumn.setDescName("物资种类");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdAuditor");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("审核人");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEditor");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("编制人");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEditInstruction");
		eiColumn.setFieldLength(200);
		eiColumn.setDescName("编制说明");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEditDate");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("编制日期");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRemark");
		eiColumn.setFieldLength(200);
		eiColumn.setDescName("备注");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdStatus");
		eiColumn.setType("C");
		eiColumn.setScaleLength(0);
		eiColumn.setFieldLength(38);
		eiColumn.setDescName("状态");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCMStockPlan() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - 主键
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - 主键
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdYear - 年份
	 * 
	 * @return the fdYear
	 */
	public String getFdYear() {
		return this.fdYear;
	}

	/**
	 * set the fdYear - 年份
	 */
	public void setFdYear(String fdYear) {
		this.fdYear = fdYear;
	}

	/**
	 * get the fdMonth - 月份
	 * 
	 * @return the fdMonth
	 */
	public String getFdMonth() {
		return this.fdMonth;
	}

	/**
	 * set the fdMonth - 月份
	 */
	public void setFdMonth(String fdMonth) {
		this.fdMonth = fdMonth;
	}

	/**
	 * get the fdChief - 单位主管
	 * 
	 * @return the fdChief
	 */
	public String getFdChief() {
		return this.fdChief;
	}

	/**
	 * set the fdChief - 单位主管
	 */
	public void setFdChief(String fdChief) {
		this.fdChief = fdChief;
	}

	/**
	 * get the fdPlanStatus - 计划状态
	 * 
	 * @return the fdPlanStatus
	 */
	public String getFdPlanStatus() {
		return this.fdPlanStatus;
	}

	/**
	 * set the fdPlanStatus - 计划状态
	 */
	public void setFdPlanStatus(String fdPlanStatus) {
		this.fdPlanStatus = fdPlanStatus;
	}

	/**
	 * get the fdPlanSum - 计划总价
	 * 
	 * @return the fdPlanSum
	 */
	public Double getFdPlanSum() {
		return this.fdPlanSum;
	}

	/**
	 * set the fdPlanSum - 计划总价
	 */
	public void setFdPlanSum(Double fdPlanSum) {
		this.fdPlanSum = fdPlanSum;
	}

	/**
	 * get the fdMaterialNum - 物资种类
	 * 
	 * @return the fdMaterialNum
	 */
	public Long getFdMaterialNum() {
		return this.fdMaterialNum;
	}

	/**
	 * set the fdMaterialNum - 物资种类
	 */
	public void setFdMaterialNum(Long fdMaterialNum) {
		this.fdMaterialNum = fdMaterialNum;
	}

	/**
	 * get the fdAuditor - 审核人
	 * 
	 * @return the fdAuditor
	 */
	public String getFdAuditor() {
		return this.fdAuditor;
	}

	/**
	 * set the fdAuditor - 审核人
	 */
	public void setFdAuditor(String fdAuditor) {
		this.fdAuditor = fdAuditor;
	}

	/**
	 * get the fdEditor - 编制人
	 * 
	 * @return the fdEditor
	 */
	public String getFdEditor() {
		return this.fdEditor;
	}

	/**
	 * set the fdEditor - 编制人
	 */
	public void setFdEditor(String fdEditor) {
		this.fdEditor = fdEditor;
	}

	/**
	 * get the fdEditInstruction - 编制说明
	 * 
	 * @return the fdEditInstruction
	 */
	public String getFdEditInstruction() {
		return this.fdEditInstruction;
	}

	/**
	 * set the fdEditInstruction - 编制说明
	 */
	public void setFdEditInstruction(String fdEditInstruction) {
		this.fdEditInstruction = fdEditInstruction;
	}

	/**
	 * get the fdEditDate - 编制日期
	 * 
	 * @return the fdEditDate
	 */
	public String getFdEditDate() {
		return this.fdEditDate;
	}

	/**
	 * set the fdEditDate - 编制日期
	 */
	public void setFdEditDate(String fdEditDate) {
		this.fdEditDate = fdEditDate;
	}

	/**
	 * get the fdRemark - 备注
	 * 
	 * @return the fdRemark
	 */
	public String getFdRemark() {
		return this.fdRemark;
	}

	/**
	 * set the fdRemark - 备注
	 */
	public void setFdRemark(String fdRemark) {
		this.fdRemark = fdRemark;
	}

	/**
	 * get the fdStatus - 状态
	 * 
	 * @return the fdStatus
	 */
	public Long getFdStatus() {
		return this.fdStatus;
	}

	/**
	 * set the fdStatus - 状态
	 */
	public void setFdStatus(Long fdStatus) {
		this.fdStatus = fdStatus;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdYear(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdYear")), fdYear));
		setFdMonth(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMonth")), fdMonth));
		setFdChief(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdChief")), fdChief));
		setFdPlanStatus(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdPlanStatus")), fdPlanStatus));
		setFdPlanSum(NumberUtils.toDouble(StringUtils.toString(map.get("fdPlanSum")), fdPlanSum));
		setFdMaterialNum(NumberUtils.toLong(StringUtils.toString(map.get("fdMaterialNum")), fdMaterialNum));
		setFdAuditor(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdAuditor")), fdAuditor));
		setFdEditor(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEditor")), fdEditor));
		setFdEditInstruction(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEditInstruction")), fdEditInstruction));
		setFdEditDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEditDate")), fdEditDate));
		setFdRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRemark")), fdRemark));
		setFdStatus(NumberUtils.toLong(StringUtils.toString(map.get("fdStatus")), fdStatus));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdYear", StringUtils.toString(fdYear, eiMetadata.getMeta("fdYear")));
		map.put("fdMonth", StringUtils.toString(fdMonth, eiMetadata.getMeta("fdMonth")));
		map.put("fdChief", StringUtils.toString(fdChief, eiMetadata.getMeta("fdChief")));
		map.put("fdPlanStatus", StringUtils.toString(fdPlanStatus, eiMetadata.getMeta("fdPlanStatus")));
		map.put("fdPlanSum", StringUtils.toString(fdPlanSum, eiMetadata.getMeta("fdPlanSum")));
		map.put("fdMaterialNum", StringUtils.toString(fdMaterialNum, eiMetadata.getMeta("fdMaterialNum")));
		map.put("fdAuditor", StringUtils.toString(fdAuditor, eiMetadata.getMeta("fdAuditor")));
		map.put("fdEditor", StringUtils.toString(fdEditor, eiMetadata.getMeta("fdEditor")));
		map.put("fdEditInstruction", StringUtils.toString(fdEditInstruction, eiMetadata.getMeta("fdEditInstruction")));
		map.put("fdEditDate", StringUtils.toString(fdEditDate, eiMetadata.getMeta("fdEditDate")));
		map.put("fdRemark", StringUtils.toString(fdRemark, eiMetadata.getMeta("fdRemark")));
		map.put("fdStatus", StringUtils.toString(fdStatus, eiMetadata.getMeta("fdStatus")));

		return map;

	}
}